{extend name="base"}
{block name="title"}房卡消耗统计{/block}
{block name="head"}
{/block}
{block name="body"}
<body class="mainbody">
<form>
    <!--导航栏-->
    <div class="location">
        <a href="javascript:history.back(-1);" class="back"><i class="iconfont icon-up"></i><span>返回上一页</span></a>
        <a href="{:url('index/home')}" class="home"><i class="iconfont icon-home"></i><span>首页</span></a>
        <i class="arrow iconfont icon-arrow-right"></i>
        <span>房卡消耗统计</span>
    </div>
    <!--/导航栏-->

    <!--工具栏-->
    <div id="floatHead" class="toolbar-wrap">
        <div class="toolbar">
            <div class="box-wrap">
                <a class="menu-btn"><i class="iconfont icon-more"></i></a>
                <div class="l-list">
                    <div class="menu-list">
                        <div class="rule-single-select">
                            <select name="Channel" style="display:none">
                                <option value="-1">===所有渠道===</option>
                                {volist name="CHANNELS" id="val"}
                                <option value="{$key}"{eq name="Channel" value="$key"} selected{/eq}>[{$key}]{$val.Name}</option>
                                {/volist}
                            </select>
                        </div>
                        <div class="rule-single-select">
                            <select name="KindID" style="display:none">
                                <option value="-1">===所有游戏===</option>
                                {volist name="GAME_KIND" id="val"}
                                <option value="{$key}"{eq name="KindID" value="$key"} selected{/eq}>[{$key}]{$val}</option>
                                {/volist}
                            </select>
                        </div>
                        <input type="text" class="input rule-date-input" id="time1" autocomplete="off" {literal}onclick="WdatePicker({maxDate:'#F{$dp.$D(\'time2\')}'})"{/literal} name="time1" value="{$time1|default=''|substr=0,10}" /> -
                        <input type="text" class="input rule-date-input" id="time2" autocomplete="off" {literal}onclick="WdatePicker({minDate:'#F{$dp.$D(\'time1\')}', maxDate:'%y-%M-%d'})"{/literal} name="time2" value="{$time2|default=''|substr=0,10}" />&nbsp;

                        <a class="btn-search"><i class="iconfont icon-search"></i></a>
                    </div>
                </div>
                <div class="r-list">
                    <label style="color:#f00;">{$info.TotalDay|default=0}天合计：{$info.TotalALL}，日均消耗：{:floor($info.AvgDay)}</label>
                </div>
            </div>
        </div>
    </div>
    <!--/工具栏-->

    <!--列表-->
    <div class="table-container">
        <table class="ltable border-table" data-auto="0">
            <tr>
                <th>时间</th>
                <th>合计</th>
                {for start="0" end="24"}<th>{$i}</th>{/for}
            </tr>
            {empty name="tree"}
            <tr><td colspan="26">Oh~暂无数据!</td></tr>
            {else}
            {volist name="tree" id="a" key="i"}
            <tr>
                <th><a target="_blank" href="{:url('user.glod.glod/index')}?time1={$key}&time2={$key}&Channel={$Channel}&KindID={$KindID}">{$key}</a></th>
                <td><a target="_blank" href="{:url('user.glod.glod/index')}?time1={$key}&time2={$key}&Channel={$Channel}&KindID={$KindID}" class="{gt name='a.total' value='$info.AvgDay'}red{else}green{/gt}">{$a.total}</a></td>
                {for start="0" end="24" name="j"}
                <td {$a['child'][$j]['c']?=' class="red"'}>{$a['child'][$j]['c']?:0}</td>
                {/for}
            </tr>
            {/volist}
            {/empty}
        </table>
    </div>
    <!--/列表-->

    <!--内容底部-->
    <div class="page-footer"><div class="btn-wrap">{$page->render()}</div></div>
    <!--/内容底部-->

</form>
</body>
{/block}